﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucNewsDetail.ascx.cs"
    Inherits="TTMarketing.UserControl.ucNewsDetail" %>
<asp:ObjectDataSource ID="odsNews" runat="server" SelectMethod="getById" TypeName="TTBusiness.ClassDB.clsBSNews">
    <selectparameters>
        <asp:QueryStringParameter DefaultValue="" Name="id" QueryStringField="id" 
            Type="Int32" />
    </selectparameters>
</asp:ObjectDataSource>
<telerik:RadListView ID="RadListView1" runat="server" DataSourceID="odsNews" BorderWidth="0px"
    ItemPlaceholderID="ph" AllowPaging="True" PageSize="15" Width="100%">
    <LayoutTemplate>
        <asp:PlaceHolder runat="server" id="ph" />
    </LayoutTemplate>
    <ItemTemplate>
        <div style="width: 100%;">
            <div style="float: left; width: 100%;margin-top:5px;">
                <span style="font-size: 17px; color: Black;font-weight:bold">
                    <asp:Label runat="server" id="lblTitle" Text='<%# Eval("Title") %>'></asp:Label>
                </span>
                <br />
                <span style="font-size: 10px; color: Gray;">
                    <asp:Label runat="server" id="lblDate" Text='<%#Eval("Date") %>'></asp:Label></span>
            </div>
            <div style="float: left; width: 100px; margin-top: 10px">
                <img alt='<%# Eval("Title") %>' class="news-photo" src='<%# "~/Image/Upload/" +Eval("Image") %>' /></div>
            <div style="float: left; width: 420px; margin-top: 10px; margin-left: 10px;">
                <asp:Label ID="Label2" runat="server" Text='<%# Eval("Summary") %>'></asp:Label></div>
            <div style="float: left; width: 100%;">
                <asp:Label ID="lblDetails" runat="server" Text='<%# Eval("Detail") %>'></asp:Label></div>
        </div>
    </ItemTemplate>
    <EmptyDataTemplate>
        <div class="RadListView RadListView_Default">
            <div class="rlvEmpty">
                Dữ liệu đang cập nhật</div>
        </div>
    </EmptyDataTemplate>
</telerik:RadListView>
<br />
<br />
<br />
<div style="float: left">
    <b>Cùng loại :</b>
    <br />
    <telerik:RadListView ID="RadListView2" runat="server" DataSourceID="odsOther" BorderWidth="0px"
        ItemPlaceholderID="ph" AllowPaging="True" PageSize="15" Width="100%">
        <LayoutTemplate>
            <asp:PlaceHolder runat="server" id="ph" />
        </LayoutTemplate>
        <ItemTemplate>
            <table width="100%" id="News-l0">
                <tr>
                    <td align="left" valign="top">
                        &raquo; <a href='<%# "?id="+Eval("ID") %>'>
                            <%# Eval("Title") %>
                        </a>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
        <EmptyDataTemplate>
            <div class="RadListView RadListView_Default">
                <div class="rlvEmpty">
                    Dữ liệu đang cập nhật</div>
            </div>
        </EmptyDataTemplate>
    </telerik:RadListView>
    <asp:ObjectDataSource ID="odsOther" runat="server" SelectMethod="getOtherNews" TypeName="TTBusiness.ClassDB.clsBSNews">
        <selectparameters>
        <asp:QueryStringParameter Name="id" QueryStringField="id" Type="Int32" />
    </selectparameters>
    </asp:ObjectDataSource>
</div>
